3.1.61 \(\int \frac {1}{\sqrt {1+\cos ^2(x)}} \, dx\) [61]

Optimal. Leaf size=9 \[ F\left (\left .\frac {\pi }{2}+x\right |-1\right ) \]

[Out]

-(sin(x)^2)^(1/2)/sin(x)*EllipticF(cos(x),I)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3261} \begin {gather*} F\left (\left .x+\frac {\pi }{2}\right |-1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[1 + Cos[x]^2],x]

[Out]

EllipticF[Pi/2 + x, -1]

Rule 3261

Int[1/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(1/(Sqrt[a]*f))*EllipticF[e + f*x, -b/a]
, x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {1+\cos ^2(x)}} \, dx &=F\left (\left .\frac {\pi }{2}+x\right |-1\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 11, normalized size = 1.22 \begin {gather*} \frac {F\left (x\left |\frac {1}{2}\right .\right )}{\sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[1 + Cos[x]^2],x]

[Out]

EllipticF[x, 1/2]/Sqrt[2]

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (17 ) = 34\).
time = 0.32, size = 41, normalized size = 4.56

method result size
default \(-\frac {\sqrt {\left (1+\cos ^{2}\left (x \right )\right ) \left (\sin ^{2}\left (x \right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (2 x \right )}{2}}\, \EllipticF \left (\cos \left (x \right ), i\right )}{\sqrt {1-\left (\cos ^{4}\left (x \right )\right )}\, \sin \left (x \right )}\) \(41\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+cos(x)^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-((1+cos(x)^2)*sin(x)^2)^(1/2)*(sin(x)^2)^(1/2)/(1-cos(x)^4)^(1/2)*EllipticF(cos(x),I)/sin(x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(cos(x)^2 + 1), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (16) = 32\).
time = 0.11, size = 87, normalized size = 9.67 \begin {gather*} \sqrt {2 \, \sqrt {2} - 3} {\left (2 i \, \sqrt {2} + 3 i\right )} F(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) + i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) + \sqrt {2 \, \sqrt {2} - 3} {\left (-2 i \, \sqrt {2} - 3 i\right )} F(\arcsin \left (\sqrt {2 \, \sqrt {2} - 3} {\left (\cos \left (x\right ) - i \, \sin \left (x\right )\right )}\right )\,|\,12 \, \sqrt {2} + 17) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(1/2),x, algorithm="fricas")

[Out]

sqrt(2*sqrt(2) - 3)*(2*I*sqrt(2) + 3*I)*elliptic_f(arcsin(sqrt(2*sqrt(2) - 3)*(cos(x) + I*sin(x))), 12*sqrt(2)
 + 17) + sqrt(2*sqrt(2) - 3)*(-2*I*sqrt(2) - 3*I)*elliptic_f(arcsin(sqrt(2*sqrt(2) - 3)*(cos(x) - I*sin(x))),
12*sqrt(2) + 17)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {\cos ^{2}{\left (x \right )} + 1}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)**2)**(1/2),x)

[Out]

Integral(1/sqrt(cos(x)**2 + 1), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+cos(x)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(cos(x)^2 + 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.11 \begin {gather*} \int \frac {1}{\sqrt {{\cos \left (x\right )}^2+1}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(x)^2 + 1)^(1/2),x)

[Out]

int(1/(cos(x)^2 + 1)^(1/2), x)

________________________________________________________________________________________